var _n21;
var cc__extends = __extends;
var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var ccp_menu = cc__decorator.menu;
var def_Ipha_Rotation = function (t) {
  function _ctor() {
    // 创建实例并设置默认属性
    const instance = null !== t && t.apply(this, arguments) || this;

    // 设置旋转速度和方向
    instance.rotationSpeed = 10; // 旋转速度
    instance.dir = 1; // 方向（1 表示顺时针，-1 表示逆时针）

    return instance; // 返回实例
  }
  cc__extends(_ctor, t);
  _ctor.prototype.start = function () {
    // 创建一个持续旋转的 tween 动画
    cc.tween(this.node)
      .by(0.1, { angle: this.rotationSpeed * this.dir }) // 按角度旋转
      .repeatForever() // 永久重复
      .start(); // 启动动画
  };
  cc__decorate([ccp_property({
    displayName: "旋转速度"
  })], _ctor.prototype, "rotationSpeed", undefined);
  cc__decorate([ccp_property({
    displayName: "旋转方向",
    tooltip: "1 or -1"
  })], _ctor.prototype, "dir", undefined);
  return cc__decorate([ccp_ccclass, ccp_menu("ipha组件/简单旋转")], _ctor);
}(cc.Component);
exports.default = def_Ipha_Rotation;